//
//  ZXFDYWCCell.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/19.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "ZXFDYWCCell.h"

@implementation ZXFDYWCCell
- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
        [self layout];
    }
    return self;
}
- (void)initSubView{
    self.backgroundColor = CONTENTBACKCOLOR;
    [self addSubview:self.titleLabel];
    [self addSubview:self.fuDaoLeiXingLabel];
    [self addSubview:self.mentorLabel];
    [self addSubview:self.fuDaoCeShuLabel];
    [self addSubview:self.jieZhiRiQiLabel];
    [self addSubview:self.xueShengNumLabel];
    [self addSubview:self.keMuLable];
    
}
- (void)layout{
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@12);
        make.right.equalTo(@0).offset(-12);
        make.top.equalTo(@15);
        make.height.equalTo(@12);
    }];
    [_fuDaoLeiXingLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@12);
        make.right.equalTo(@0).offset(-12);
        make.top.equalTo(self.titleLabel.mas_bottom).offset(14);
        make.height.equalTo(@12);
    }];
    [_mentorLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@12);
        make.right.equalTo(@0).offset(-12);
        make.top.equalTo(self.fuDaoLeiXingLabel.mas_bottom).offset(11);
        make.height.equalTo(@12);
    }];
    [_fuDaoCeShuLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@12);
        make.right.equalTo(@0).offset(-12);
        make.top.equalTo(self.mentorLabel.mas_bottom).offset(11);
        make.height.equalTo(@12);
    }];
    [_jieZhiRiQiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@12);
        make.right.equalTo(@0).offset(-12);
        make.top.equalTo(self.fuDaoCeShuLabel.mas_bottom).offset(11);
        make.height.equalTo(@12);
    }];
    [_xueShengNumLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@12);
        make.right.equalTo(@0).offset(-12);
        make.top.equalTo(self.jieZhiRiQiLabel.mas_bottom).offset(11);
        make.height.equalTo(@12);
    }];
    [_keMuLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@12);
        make.right.equalTo(@0).offset(-12);
        make.top.equalTo(self.xueShengNumLabel.mas_bottom).offset(11);
        make.height.equalTo(@12);
    }];
}
- (UILabel *)titleLabel{
    if (!_titleLabel) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(0,0,156.5,13);
        label.numberOfLines = 0;
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = TITLECOLOR;
        label.text = @"单茹 18 新一 1-D 六A-试听生";
        _titleLabel = label;
    }
    return _titleLabel;
}
- (UILabel *)fuDaoLeiXingLabel{
    if (!_fuDaoLeiXingLabel) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(0,0,156.5,13);
        label.numberOfLines = 0;
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = TITLECOLOR;
        label.text = @"辅导类型：试听生";
        label.attributedText = [PublickFunctionObject getPriceAttribute:label.text and:[UIColor redColor] andChangeBenginString:@"：" andEndString:@"" andSize:12];
        _fuDaoLeiXingLabel = label;
    }
    return _fuDaoLeiXingLabel;
}
- (UILabel *)mentorLabel{
    if (!_mentorLabel) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(331.5,150,161,12.5);
        label.numberOfLines = 0;
        label.text = @"老师姓名：李梦迪";
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = TITLECOLOR;
        _mentorLabel = label;
    }
    return _mentorLabel;
}
- (UILabel *)fuDaoCeShuLabel{
    if (!_fuDaoCeShuLabel) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(0,0,156.5,13);
        label.numberOfLines = 0;
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = TITLECOLOR;
        label.text = @"辅导次数：3/3";
        _fuDaoCeShuLabel = label;
    }
    return _fuDaoCeShuLabel;
}
- (UILabel *)jieZhiRiQiLabel{
    if (!_jieZhiRiQiLabel) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(0,0,156.5,13);
        label.numberOfLines = 0;
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = TITLECOLOR;
        label.text = @"截止日期：2019-04-01 10:20~2019-04-05 10:20";
        _jieZhiRiQiLabel = label;
    }
    return _jieZhiRiQiLabel;
}
- (UILabel *)xueShengNumLabel{
    if (!_xueShengNumLabel) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(0,0,156.5,13);
        label.numberOfLines = 0;
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = TITLECOLOR;
        label.text = @"学生数量：5";
        label.attributedText = [PublickFunctionObject getPriceAttribute:label.text and:SELECTEDCOLOR andChangeBenginString:@"：" andEndString:@"" andSize:12];
        _xueShengNumLabel = label;
    }
    return _xueShengNumLabel;
}
- (UILabel *)keMuLable{
    if (!_keMuLable) {
        UILabel *label = [[UILabel alloc] init];
        label.frame = CGRectMake(0,0,156.5,13);
        label.numberOfLines = 0;
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = TITLECOLOR;
        label.text = @"完成日期：2019-04-06 10：20";
        label.attributedText = [PublickFunctionObject getPriceAttribute:label.text and:SELECTEDCOLOR andChangeBenginString:@"：" andEndString:@"" andSize:12];
        _keMuLable = label;
    }
    return _keMuLable;
}
@end
